<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<link rel="stylesheet" href="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/css/payment.css" />
	<title>后盾网学员项目-仿哇塞网</title>
</head>
<body>
<?php if(!isset($_SESSION['uid']) or !isset($_SESSION['username'])){?>
	<script type="text/javascript">
		location.href="<?php echo U('Index/index');?>"
	</script>
<?php }?>
<!-- 公用头部开始 -->
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><link rel="shortcut icon" href="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/css/common.css" />
<link rel="stylesheet" href="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/css/index.css" />
<script type='text/javascript' src='http://localhost/qm_shop/hdphp/hdphp/../hdjs/jquery-1.8.2.min.js'></script>
<link href='http://localhost/qm_shop/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://localhost/qm_shop/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://localhost/qm_shop/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://localhost/qm_shop/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
		HOST = 'http://localhost';
		ROOT = 'http://localhost/qm_shop';
		WEB = 'http://localhost/qm_shop/index.php';
		URL = 'http://localhost/qm_shop/index.php/Index/Order/payment/oid/123';
		HDPHP = 'http://localhost/qm_shop/hdphp/hdphp';
		HDPHPDATA = 'http://localhost/qm_shop/hdphp/hdphp/Data';
		HDPHPTPL = 'http://localhost/qm_shop/hdphp/hdphp/Lib/Tpl';
		HDPHPEXTEND = 'http://localhost/qm_shop/hdphp/hdphp/Extend';
		APP = 'http://localhost/qm_shop/index.php/Index';
		CONTROL = 'http://localhost/qm_shop/index.php/Index/Order';
		METH = 'http://localhost/qm_shop/index.php/Index/Order/payment';
		GROUP = 'http://localhost/qm_shop/./Qmshop';
		TPL = 'http://localhost/qm_shop/./Qmshop/App/Index/Tpl';
		CONTROLTPL = 'http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order';
		STATIC = 'http://localhost/qm_shop/Static';
		PUBLIC = 'http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public';
		HISTORY = 'http://localhost/qm_shop/index.php/Index/Order/order';
		HTTPREFERER = 'http://localhost/qm_shop/index.php/Index/Order/order';
</script>
<script type="text/javascript" src='http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/js/index.js'></script>
<!-- 头部开始 -->
	<div id="header">
		<div class="headBox">
			<div class="headTop">
					<div id="loginCart">
						<?php if(isset($_SESSION['uid']) && isset($_SESSION['username'])){?>
							<div class="fl fixed header_avatar">
								<a class="avatar_new" href="<?php echo U('User/index',array('uid'=>$_SESSION['uid']));?>">
									<img width="30" height="30" 
									<?php if(is_file($uheadimg)){?>
										src="<?php echo $uheadimg;?>"
									<?php  }else{ ?>
										src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/avatar.php.jpg"
									<?php }?>>
								</a>
								<div class="username">
									<div class="n_username">
										<a href="<?php echo U('User/index',array('uid'=>$_SESSION['uid']));?>"><?php echo $_SESSION['username'];?> </a>
										<span style="color:#ff762d; font-size:12px;cursor:pointer" onclick="hd_ajax('<?php echo U('LogReg/logout');?>')">退出</span>
									</div>
								</div>
							</div>
						<?php  }else{ ?>
							<div class="login">
								<a href="<?php echo U('LogReg/login');?>">登陆</a>
								<a href="<?php echo U('LogReg/register');?>">注册</a>
							</div>
						<?php }?>
						<div class="cart">
							<a href="<?php echo U('Order/cart');?>">购物车<span class="head_n_kind allNum"><?php if(isset($_SESSION['cart'])){?><?php echo $_SESSION['cart']['total_rows'];?><?php  }else{ ?>0<?php }?></span>件</a>
						</div>
					</div>
					<h1 id="logo">
						<a href="http://localhost/qm_shop"></a>
					</h1>
			</div>
			<div class="headBottom">
				<ul>
					<li class="homePage">
						<a href="http://localhost/qm_shop">首页</a>
					</li>
					<li class="category">
						<a href="<?php echo U('Category/top_list');?>">分类</a>
						<div class="content">
							<div class="widget">
								<div class="cate">
									<div class="catetop fixed">
										<a href="<?php echo U('Category/top_list');?>">
											<p class="english" style="color:#f3142b;">CUSTOM</p>
											<p style="font-size:16px;">全部分类</p>
										</a>
										<a href="<?php echo U('Category/sub_list',array('order'=>'new'));?>">
											<p class="english" style="color:#78dd00;">NEW</p>
											<p style="font-size:16px;">最新</p>
										</a>
										<a href="<?php echo U('Category/sub_list',array('order'=>'hot'));?>">
											<p class="english" style="color:#ff6c00;">HOT</p>
											<p style="font-size:16px;">最热</p>
										</a>
										<a href="<?php echo U('Category/sub_list',array('order'=>'love'));?>">
											<p class="english" style="color:#ff48b4;">LOVE</p>
											<p style="font-size:16px;">喜欢最多</p>
										</a>
									</div>
									<div class="cateitem ct">
										<?php $hd["list"]["value"]["total"]=0;if(isset($topCate) && !empty($topCate)):$_id_value=0;$_index_value=0;$lastvalue=min(8,count($topCate));
$hd["list"]["value"]["first"]=true;
$hd["list"]["value"]["last"]=false;
$_total_value=ceil($lastvalue/1);$hd["list"]["value"]["total"]=$_total_value;
$_data_value = array_slice($topCate,0,$lastvalue);
if(count($_data_value)==0):echo "";
else:
foreach($_data_value as $key=>$value):
if(($_id_value)%1==0):$_id_value++;else:$_id_value++;continue;endif;
$hd["list"]["value"]["index"]=++$_index_value;
if($_index_value>=$_total_value):$hd["list"]["value"]["last"]=true;endif;?>

											<a target="_blank" href="<?php echo U('Category/sub_list',array('cid'=>$value['cid']));?>"><?php echo $value['cname'];?></a>
										<?php $hd["list"]["value"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
									</div>
									<div class="catetag">
										<?php if(is_array($category)):?><?php  foreach($category as $value){ ?>
											<dl class="fixed">
												<dt><?php echo $value['cname'];?>：</dt>
												<dd>
													<?php if(is_array($value['down'])):?><?php  foreach($value['down'] as $v){ ?>
														<a href="<?php echo U('Category/sub_list',array('cid'=>$v['cid']));?>"><?php echo $v['cname'];?></a>
													<?php }?><?php endif;?>
												</dd>
											</dl>
										<?php }?><?php endif;?>
									</div>
									<div class="catemore">
										<a href="<?php echo U('Category/top_list');?>">
											MORE 更多分类 >
										</a>
									</div>
									<div class="dot"></div>
								</div>
							</div>
						</div>
					</li>
					<?php if(is_array($chan)):?><?php  foreach($chan as $value){ ?>
					<li>
						<a href="<?php echo U('Category/sub_list',array('nid'=>$value['nid']));?>"><?php echo $value['nname'];?></a>
					</li>
					<?php }?><?php endif;?>
				</ul>
				<div class="search">
					<form action="<?php echo U('Search/index');?>" method="post">
						<input type="text" placeholder="请输入要搜索的关键词" name="keyword"/>
						<input type="submit" value="" class="searchBtn">
					</form>
				</div>
			</div>
		</div>
	</div>
<!-- 头部结束 -->
<script type="text/javascript">
/**内容保存提示**/
var changeFlag = false; //内容改变标志
var is_submit = false;  //是否为提交表单动作
//标识文本框值是否改变，为true，标识已变
$(document).ready(function(){
    //文本框值改变即触发
    $("input[type='text']").change(function(){
        changeFlag=true;
    });
    //文本域改变即触发
    $("textarea").change(function(){
        changeFlag=true;
    }); 

    //提交表单
    $(":submit").click(function(){
            is_submit = true;
     });
});

//离开页面时保存文档
window.onbeforeunload = function() {
        if(changeFlag && !is_submit){
        //如果changeFlag的值为true则提示
        return '内容已改变!';
    }
}

</script>
<!-- 公用头部结束 -->
<div id="payment" class="fixed" style="width:980px; margin:50px auto;">
	<div class="flow_chart">
		<div class="pos_x1 bg_a2" title="选购商品"></div>
		<div class="pos_x2 bg_b2" title="完成订单信息并下单"></div>
		<div class="pos_x3 bg_c1" title="下单完成并支付"></div>
	</div>
	<form name="goto_pay" method="POST" action="<?php echo U('payment');?>">
		<div id="pay_wrap">
			<div class="pay_status">
				<img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/pay_status.jpg">
			</div>
			<div class="order_sub_success">
			<ul>
				<li>提示：因为此项目只是用于个人学习提高,并不会上线，并没有相应的付款接口，所以此页面只是模拟支付流程</li>
				<li>提示：如有需要，请记住我：陈磊；TEL：18976686378；QQ：18976686378。</li>
			</ul>
			</div>
			<div class="order_info">
			<span class="order_info_one">
				<a href="javascript:void(0);" id="order_a">[查看订单]</a>
				<span style="margin:0 6px">|</span>
				<a href="<?php echo U('cancle_order',array('oid'=>$oid));?>:" style="font-weight:400" onclick="if(!confirm('您确定要取消该订单吗？')) return false">取消订单</a>
			</span>
			<script type="text/javascript">
				$('#order_a').toggle(function() {
			    	$('#order_detail').show("normal");
			    }, function() {
			    	$('#order_detail').hide("normal");
			    });
			</script>
			<span class="order_info_two">
				收款方：哇噻网 总价：
				<strong>￥<?php echo $total;?></strong>
			</span>
			<div class="clear"></div>
			</div>
			<div id="order_detail" class="order_box" style="display: none;">
				<ul>
					<li class="li1">店铺商品</li>
					<li class="li2">分类名称</li>
					<li class="li4">单价</li>
					<li class="li5">数量</li>
					<li class="li6">优惠</li>
				<li class="li7">小计</li>
				</ul>
				<?php if(is_array($order)):?><?php  foreach($order as $value){ ?>
					<div class="order_info_one2">
						<dl>
							<dt>
								<img width="56px" height="56px" src="http://localhost/qm_shop/<?php echo $value['imgUrl'];?>">
							</dt>
							<p>
								<a target="_blank" href="<?php echo U('Details/index',array('gid'=>$value['qm_goods_gid']));?>"><?php echo $value['name'];?></a>
							</p>
						</dl>
						<span class="order_info_storename">
							<a target="_blank" href="<?php echo U('Category/sub_cate',array('cid'=>$value['cid']));?>">［<?php echo $value['cate'];?>］</a>
						</span>
						<span class="order_info_danjia">￥<?php echo $value['lprice'];?></span>
						<span class="order_info_num"><?php echo $value['lnumber'];?></span>
						<p class="order_info_youhui">
							<span>--</span>
						</p>
						<p class="order_info_xiaoji">
							<span style="font-size:14px;">￥<?php echo $value['lmoney'];?></span>
						</p>
					</div>
				<?php }?><?php endif;?>
			</div>
			<div class="clear"></div>
			<div class="choise_pay_box">
				<ul class="pay_nav">
					<li class="pay_over" onclick="select_payType(0);">网银支付</li>
					<li onclick="select_payType(1);">支付宝支付</li>
					<li onclick="select_payType(2);">财付通支付</li>
					<li class="pay_nav_empty"></li>
					<div class="clear"></div>
				</ul>
				<script type="text/javascript">
					function select_payType (n) {
						$('.pay_nav li').eq(n).addClass('pay_over').siblings('li').removeClass('pay_over');
				    	$('.pay_type_box').eq(n).show().siblings('.pay_type_box').hide();
				    }
				</script>
				<div class="pay_select_box">
					<div class="pay_type_box" style="display:block">			
						<dl>
							<dt>
								<input id="payment_alipay" type="radio" value="alipay" name="payment_code" wowtype="payment_type">
							</dt>
							<dd>
								<label for="payment_alipay">
									<img width="115" height="35" title="中国工商银行-" alt="中国工商银行-" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/gongshang.gif">
								</label>
							</dd>
						</dl>
					</div>
					<div class="pay_type_box" style="display:none">				
						<dl>
							<dt>
								<input id="payment_alipay" type="radio" value="alipay" name="payment_code" wowtype="payment_type">
							</dt>
							<dd>
								<label for="payment_alipay">
									<img width="115" height="35" title="支付宝-" alt="支付宝-" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/logo.gif">
								</label>
							</dd>
						</dl>
					</div>
					<div class="pay_type_box" style="display:none">				
						<dl>
							<dt>
								<input id="payment_alipay" type="radio" value="alipay" name="payment_code" wowtype="payment_type">
							</dt>
							<dd>
								<label for="payment_alipay">
									<img width="115" height="35" title="财付通-" alt="财付通-" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/caifu.gif">
								</label>
							</dd>
						</dl>
					</div>
					<div class="clear"></div>
					<div id="submit_form" class="confirm_pay_butbox">
						<input type="hidden" name='oid' value="<?php echo $oid;?>"/>
						<a href="javascript:void(0)" onclick="return dosubmit();">
							<img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/confirmation_pay.jpg">
						</a>
					</div>
					<script type="text/javascript">
						function dosubmit () {
                        	document.goto_pay.submit();
                    	}
					</script>
				</div>
			</div>
		</div>
	</form>
</div>
<!-- 公用页脚开始 -->
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!-- 底部版权信息开始 -->
<div id="footer">
	<!-- <div class="footerTop">
		<div class="footerTopCon fixed">
			<div class="jingcai fl">
				<p class="fTitle">更多精彩</p>
				<ul>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
				</ul>
			</div>
			<div class="chengnuo fl">
				<p class="fTitle">我们承诺</p>
				<ul>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
				</ul>
			</div>
			<div class="guanzhu fl">
				<p class="fTitle">在这里关注我们</p>
				<ul>
					<li><a href="" target="_blank">新浪微博</a>
					</li>
					<li><a href="" target="_blank">新浪微博</a>
					</li>
					<li><a href="" target="_blank">新浪微博</a>
					</li>
				</ul>
			</div>
			<div class="tdCode fl"><img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/edCode.png" alt="二维码占位" /></div>
		</div>
	</div> -->
	<div class="footerBottom">
		<div class="footerBottomCon">
			<p class='footerqm'>后盾网 人人做后盾</p>
			<div class="footerNav ct">
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
			</div>
			<!-- <p class="beian ct">北京哇噻网信息技术有限公司 WowSai.com Copyright© 2008-2013 [京ICP备10020900][京ICP证090011号]</p> -->
			<p class="beian ct">此项目只是用于个人学习提高,如有需要，请记住我：陈磊；TEL：18976686378；QQ：18976686378。</p>
			<div class="zhengshu">
				<a href="" target="_blank"><img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/108_40_cart.png" alt="证书图片占位" /></a>
				<a href="" target="_blank"><img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/108_40_cart.png" alt="证书图片占位" /></a>
				<a href="" target="_blank"><img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/108_40_cart.png" alt="证书图片占位" /></a>
			</div>
		</div>
	</div>
	<div class="footerBlank fixed"></div>
</div>
<!-- 底部版权信息结束 -->
<!-- 公用页脚结束 -->
</body>
</html>